We present a spectral theory of the low-frequency response of a harbour to short and random incident waves. Assuming the incident sea to be stationary and Gaussian, nonlinear extensions are made for the response spectrum. Advantage is taken of the typical wind-wave spectrum which is dominated by high-frequency components. After showing that nonlinearity is needed only up to the second order in wave steepness, we extend the mild-slope approximation for constructing the transfer functions. Numerical examples are presented for a square harbour and constant depth. Discounting friction losses, the effects of different entrances are compared.